package com.song.pattern.proxy;

import com.song.pattern.proxy.source.Source;
import com.song.pattern.proxy.source.Sourceable;

public class Proxy implements Sourceable{

	private Source source;
	
	public Proxy() {
		super();
		this.source = new Source();
	}
	
	@Override
	public void method() {
		before();
		source.method();
		after();
	}

	private void after() {
		System.out.println("after proxy!");
	}

	private void before() {
		System.out.println("before proxy!");
		
	}
	
	
}
